#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define y1 y_alpha_1

using namespace std;

using ll = long long;
using db = double;
using vec = vector<int>;
using pii = pair<int,int>;

int read() {
	int x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-',ch = getchar();
	while(isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48),ch = getchar();
	return f ? -x : x;
}

const int N = 1e4 + 10;
const int mod = 1e9 + 7;

void upd(int &x) { x = x + (x >> 31 & mod); }

int f[18][N],pw[N],fac[N],ifac[N],K,d,n;

ll C(int x,int y) { return x < y || x < 0 || y < 0 ? 0 : (ll) fac[x] * ifac[y] % mod * ifac[x - y] % mod; }

ll qp(ll x,int t) { ll res = 1; for(;t;t >>= 1,x = x * x % mod) if(t & 1) res = res * x % mod; return res;}

int main() {
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in,K = in,d = in; for(int i = (fac[0] = 1);i <= n;i++) fac[i] = (ll) fac[i - 1] * i % mod; ifac[n] = qp(fac[n],mod-2);
	for(int i = n - 1;i >= 0;i--) ifac[i] = (ll) ifac[i + 1] * (i + 1) % mod;
	f[0][0] = 1;
	for(int i = 0;i <= 16;i++) 
		for(int j = 0;j <= n - K;j++) {
			for(int x = 0;x * (d + 1) * (1 << i) + j <= n - K && x * (d + 1) <= K / 2;x++)
				upd(f[i + 1][j + x * (d + 1) * (1 << i)] += (ll) f[i][j] * C(K / 2,x * (d + 1)) % mod - mod);
		}
	int ans = 0;
	for(int j = 0;j <= n - K;j++) upd(ans += (ll) f[17][j] * C(n - j - K / 2,K / 2) % mod - mod);
	upd(ans = C(n,K) - ans);
	printf("%d\n",ans);
	return 0;
}
